//
//  CoreGraphicsTYExt.h
//  TYFoundationUtils
//
//  Created by 郭艺伟 on 2017/8/16.
//  Copyright © 2017年 郭艺伟. All rights reserved.
//

#ifndef CoreGraphicsTYExt_h
#define CoreGraphicsTYExt_h

/**
 *    使用指定的边距来缩放一个rectangle大小
 */
CG_INLINE CGRect ty_CGRectEdgeInset(CGRect rect, UIEdgeInsets insets) {
    return CGRectMake(CGRectGetMinX(rect)+insets.left, CGRectGetMinY(rect)+insets.top, CGRectGetWidth(rect)-insets.left-insets.right, CGRectGetHeight(rect)-insets.top-insets.bottom);
}
#endif /* CoreGraphicsTYExt_h */
